package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;

/**
 SELECT
 STUT_STATECODE,STUT_STATENAME,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014' THEN 1 END ) AS total,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014' AND TEAM_NAME='VCR'  THEN 1 END ) AS VCR_TOTAL,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014' AND TEAM_NAME='IGS产线'  THEN 1 END ) AS IGS_TOTAL,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' AND TRUNC( JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) THEN 1 END ) AS TODAY_COMPLETED_JOB,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' AND TRUNC( JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) AND TEAM_NAME='VCR' THEN 1 END ) AS VCR_TODAY_COMPLETED_JOB,
 COUNT( CASE WHEN STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' AND TRUNC( JOB_ACTUALENDTIME ) = TRUNC( SYSDATE ) AND TEAM_NAME='IGS产线' THEN 1 END ) AS IGS_TODAY_COMPLETED_JOB,
 COUNT( CASE WHEN TRUNC( JOB_SCHEDULEDSTARTTIME ) = TRUNC( SYSDATE ) THEN 1 END ) AS TODAY_PLAN_JOB ,
 COUNT( CASE WHEN TRUNC( JOB_SCHEDULEDSTARTTIME ) = TRUNC( SYSDATE ) AND TEAM_NAME='VCR' THEN 1 END ) AS VCR_TODAY_PLAN_JOB ,
 COUNT( CASE WHEN TRUNC( JOB_SCHEDULEDSTARTTIME ) = TRUNC( SYSDATE ) AND TEAM_NAME='IGS产线' THEN 1 END ) AS IGS_TODAY_PLAN_JOB
 FROM
 T_PLAN_JOB
 WHERE
 JOB_TYPE = 'PLAN.t_plan_Job.Job_Type.002'
 AND JOB_DIVISION = '1'
 GROUP BY
 STUT_STATECODE,STUT_STATENAME
 */
@Data
@TableName(value = "QG_JOB_ORDER", autoResultMap = true)
public class qgJobOrder  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 总数
     */
    @TableField(value = "TOTAL")
    private String total;

    /**
     * VCR总数
     */
    @TableField(value = "VCR_TOTAL")
    private String vcrTotal;

    /**
     * IGS总数
     */
    @TableField(value = "IGS_TOTAL")
    private String igsTotal;

    /**
     * 分类
     */
    @TableField(value = "STUT_STATECODE")
    private String stutStatename;

    /**
     * 今天完工的
     */
    @TableField(value = "TODAY_COMPLETED_JOB")
    private String todayCompletedJob;

    /**
     * VCR 今天完工的
     */
    @TableField(value = "VCR_TODAY_COMPLETED_JOB")
    private String vcrTodayCompletedJob;

    /**
     * IGS 今天完工的
     */
    @TableField(value = "IGS_TODAY_COMPLETED_JOB")
    private String igsTodayCompletedJob;


    /**
     * 计划数量
     */
    @TableField(value = "TODAY_PLAN_JOB")
    private long todayPlanJob;



    /**
     * 计划数量
     */
    @TableField(value = "VCR_TODAY_PLAN_JOB")
    private long vcrTodayPlanJob;


    /**
     * 计划数量
     */
    @TableField(value = "IGS_TODAY_PLAN_JOB")
    private long igsTodayPlanJob;


}
